package com.edu.bean;

import java.util.ArrayList;
import java.util.List;

/*
 * @Author:mx
 * @Date:2025/10/13-10:49:31
 */
public class User {

    private int userId;

    private String username;

    private String password;

    // 一对多 ：嵌套结果： 在1的一方 中体现多的一方，多的一方应该是集合的形式
    private List<Bill> billList;//用于装该用户的所有订单

    public List<Bill> getBillList() {
        return billList;
    }

    public void setBillList(List<Bill> billList) {
        this.billList = billList;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
